import request from '@/utils/request'

// 获取文章分类详情
export const artGetListService = async () => await request.get('/my/cate/list')

// 添加文章分类
export const artAddListService = async data =>
  await request.post('/my/cate/add', data)

// 更新文章分类
export const artUpdataListService = async data =>
  await request.put('my/cate/info', data)

// 删除文章分类
export const artDeleteListService = async data =>
  await request.delete('/my/cate/del', {
    params: { id: data }
  })

// 获取文章列表
export const artListService = params =>
  request.get('/my/article/list', {
    params
  })

// 发布文章接口
export const artPublishService = data => request.post('/my/article/add', data)

// 获取文章详情
export const artGetinfoService = id =>
  request.get('/my/article/info', { params: { id } })

// 编辑文章接口
export const artEditService = data => request.put('/my/article/info', data)

//删除文章接口
export const artDeleteService = id =>
  request.delete('/my/article/info', {
    params: { id }
  })
